HealthCorrelation PRO
The HealthCorrelation class represents a group of health samples that are logically related. It provides an interface for accessing and creating correlation records that group multiple health data types together—such as combining dietary intake and blood pressure readings, or linking ovulation tests with menstrual flow records.
Use Cases
- Grouping blood pressure systolic and diastolic values together
- Associating food intake with nutritional data
- Creating a composite record for cycle tracking events
Properties
Static Method
HealthCorrelation.create(options): HealthCorrelation | null
Creates a new correlation with one or more health samples.
Parameters
Returns
- A new
HealthCorrelationinstance if the parameters are valid. - Returns
nullif the type and samples are incompatible or validation fails.
Examples
Example 1: Create a blood pressure correlation
Example 2: Query and inspect a correlation
Notes
- Samples in a correlation must match the expected types for the given
HealthCorrelationType. - Currently supported correlation types include
"bloodPressure"and"food". - This class allows grouping samples for higher-level reasoning or visualization of composite health events.
